/**
 * Created by Administrator on 2017/5/6.
 */
'use strict';
swan_pc
    .factory("investment",function ($resource) {
        return $resource('api/investment-opps/:id',{id:"@id"},{
            "query":{
                method:"GET",
                isArray:true,
                url:"/api/investment-opps/findByEO/:id"
            },
            "save":{
                method:"POST"
            },
        })
    })
    .factory("investmentUpdate",function ($resource) {
        return $resource('api/investment-opps/:id',{iid:"@iid"},{
            "update":{
                method:"PUT"
            },
        })
    })
    .factory("investmentList",function ($resource) {
        return $resource('api/investment-opps/:id',{id:"@id"},{
            "query":{
                method:"GET",
                isArray:true
            }
        })
    })
    .factory("cause",function ($resource) {
        return $resource('api/causes/:id/user',{id:"@id"},{
            "query":{
                method:"GET",
                isArray:true
            }
        })
    })
    .factory("orgCompany",function ($resource) {
        return $resource('api/orgCompanys/findByEO/:id',{id:"@id"},{
            "query":{
                method:"GET",
                isArray:true
            }
        })
    })
    .factory("userOwn",function ($resource) {
        return $resource('api/account/byId/:id',{id:"@id"},{
            "get":{
                method:"GET",
            }
        })
    })
    .factory("orgContact",function ($resource) {
        return $resource('api/orgContacts/findByEO/:id',{id:"@id"},{
            "query":{
                method:"GET",
                isArray:true
            }
        })
    })
    .factory("orgEvent",function ($resource) {
        return $resource('api/organizations/:id/events',{id:"@id"},{
            "query":{
                method:"GET",
                isArray:true
            }
        })
    })
    .factory("orgEmployee",function ($resource) {
        return $resource('api/org_contacts/employee/:id',{id:"@id"},{
            "query":{
                method:"GET",
                isArray:true
            }
        })
    });